#include "../Render/VertexBuffer.h"
#include "../Render/TextureMgr.h"
#include "RectObject.h"

namespace cy_univerX
{
namespace world2d
{

	CRectNode::CRectNode(CSpaceNode* parent):CSpaceNode(parent), m_LocalSize(0, 0)
	{
	}

	CRectNode::CRectNode(CSpaceNode* parent, float w, float h):CSpaceNode(parent), m_LocalSize(w, h)
	{
	}

	CRectNode::~CRectNode()
	{
	}

	void CRectNode::Render(const float& window_w, const float& window_h, render::CSimpleEffectBase* eff)const
	{
		math::CVector3f uv[4];
		memset(uv, 0, sizeof(uv));

		DoRenderQuad(window_w, window_h, eff, m_Color, 
			render::CTextureMgr::Instance().GetBlankTexture2D(), 
			m_LocalSize, uv);

		ChildRender(window_w, window_h, eff);
	}

}
}